package o;

import android.graphics.Rect;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView.LayoutParams;
import androidx.recyclerview.widget.RecyclerView.j;

public abstract class mq {
    final Rect ˊ;
    private int ˏ;
    protected final j ॱ;

    public abstract int ʻ();

    public abstract int ʼ();

    public abstract int ˊ();

    public abstract int ˊ(View view);

    public abstract int ˋ(View view);

    public abstract void ˋ(int i);

    public abstract int ˎ(View view);

    public abstract int ˏ();

    public abstract int ˏ(View view);

    public abstract int ॱ();

    public abstract int ॱ(View view);

    public abstract int ॱॱ();

    public abstract int ᐝ();

    public abstract int ᐝ(View view);

    private mq(j jVar) {
        this.ˏ = Integer.MIN_VALUE;
        this.ˊ = new Rect();
        this.ॱ = jVar;
    }

    public void ˋ() {
        this.ˏ = ʻ();
    }

    public int ˎ() {
        return Integer.MIN_VALUE == this.ˏ ? 0 : ʻ() - this.ˏ;
    }

    public static mq ˊ(j jVar, int i) {
        switch (i) {
            case 0:
                return ˏ(jVar);
            case 1:
                return ˋ(jVar);
            default:
                throw new IllegalArgumentException("invalid orientation");
        }
    }

    public static mq ˏ(j jVar) {
        return new mq(jVar) {
            public int ˊ() {
                return this.ॱ.ˋˊ() - this.ॱ.ˋᐝ();
            }

            public int ॱ() {
                return this.ॱ.ˋˊ();
            }

            public void ˋ(int i) {
                this.ॱ.ʻ(i);
            }

            public int ˏ() {
                return this.ॱ.ˊˊ();
            }

            public int ˊ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.rightMargin + (this.ॱ.ॱॱ(view) + layoutParams.leftMargin);
            }

            public int ᐝ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.bottomMargin + (this.ॱ.ᐝ(view) + layoutParams.topMargin);
            }

            public int ॱ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.rightMargin + this.ॱ.ʽ(view);
            }

            public int ˋ(View view) {
                return this.ॱ.ʻ(view) - ((LayoutParams) view.getLayoutParams()).leftMargin;
            }

            public int ˏ(View view) {
                this.ॱ.ॱ(view, true, this.ˊ);
                return this.ˊ.right;
            }

            public int ˎ(View view) {
                this.ॱ.ॱ(view, true, this.ˊ);
                return this.ˊ.left;
            }

            public int ʻ() {
                return (this.ॱ.ˋˊ() - this.ॱ.ˊˊ()) - this.ॱ.ˋᐝ();
            }

            public int ʼ() {
                return this.ॱ.ˋᐝ();
            }

            public int ॱॱ() {
                return this.ॱ.ˊˋ();
            }

            public int ᐝ() {
                return this.ॱ.ˊᐝ();
            }
        };
    }

    public static mq ˋ(j jVar) {
        return new mq(jVar) {
            public int ˊ() {
                return this.ॱ.ˉ() - this.ॱ.ˍ();
            }

            public int ॱ() {
                return this.ॱ.ˉ();
            }

            public void ˋ(int i) {
                this.ॱ.ͺ(i);
            }

            public int ˏ() {
                return this.ॱ.ˋˋ();
            }

            public int ˊ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.bottomMargin + (this.ॱ.ᐝ(view) + layoutParams.topMargin);
            }

            public int ᐝ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.rightMargin + (this.ॱ.ॱॱ(view) + layoutParams.leftMargin);
            }

            public int ॱ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.bottomMargin + this.ॱ.ˊॱ(view);
            }

            public int ˋ(View view) {
                return this.ॱ.ʼ(view) - ((LayoutParams) view.getLayoutParams()).topMargin;
            }

            public int ˏ(View view) {
                this.ॱ.ॱ(view, true, this.ˊ);
                return this.ˊ.bottom;
            }

            public int ˎ(View view) {
                this.ॱ.ॱ(view, true, this.ˊ);
                return this.ˊ.top;
            }

            public int ʻ() {
                return (this.ॱ.ˉ() - this.ॱ.ˋˋ()) - this.ॱ.ˍ();
            }

            public int ʼ() {
                return this.ॱ.ˍ();
            }

            public int ॱॱ() {
                return this.ॱ.ˊᐝ();
            }

            public int ᐝ() {
                return this.ॱ.ˊˋ();
            }
        };
    }
}
